﻿using AttachScreenShotToJira.FORMS;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace AttachScreenShotToJira
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Properties.Settings.Default.bFirstRun)
            {
                MessageBox.Show("Please provide the application settings first.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);

                //set first run flag
                Properties.Settings.Default.bFirstRun = false;
                Properties.Settings.Default.Save();

                //display settings
                frmSettings frmStt = new frmSettings();
                frmStt.ShowDialog();
            }
            else
            { 
                if (args.Length == 0)
                {
                    Application.Run(new frmMain(""));
                }
                else
                {
                    Application.Run(new frmMain(args[0]));
                }
            }
        }
    }
}
